﻿using System;
using System.Collections.Generic;
using System.Text;
using System.Web;

namespace YouHP.Utility
{
    public class SessionHelper
    {
        public static string GetString(string name)
        {
            Object obj =  HttpContext.Current.Session[name];
            if (obj == null) return "";
            return obj.ToString();
        }

        public static void WriteString(string name, string value)
        {
            if (HttpContext.Current.Session[name] == null) HttpContext.Current.Session.Add(name, value);
            else HttpContext.Current.Session[name] = value;
        }
    }
}
